package br.com.felix.dbm.log;


public class Logger {

	
	private Class<?> clazz;
	
	private Logger(Class<?> clazz){
		this.clazz = clazz;
	}
	
	public static Logger getLogger(Class<?> clazz){
		return new Logger(clazz);
	}	
	
	
	public void debug(String msg){
		log(msg);
	}

	
	private void log(String msg) {
		System.out.println("["+clazz.getName()+"] " + msg);
	}

	
	public void debug(String string, String string2) {
		log(string + "==>" + string2);
	}

	public void error(String string, Exception e) {
		log(string);
		e.printStackTrace();
	}
}
